/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package az.ac.cput.wo.isp.obey.model;

/**
 *
 * @author guantong
 */
public class Loan {

    private int balance;

    /**
     * Cr eat e s a new ins t anc e o f LoanRequestHandler
     */
    public Loan(int balance) {
        this.balance = balance;
    }

    public void approveLoan(az.ac.cput.wo.ocp.obey.model.LoanVid validator) {
        if (validator.isValid(balance)) // s anc t i on the loan
        {
            System.out.println("Loan approved . . . ");
        } else {
            System.out.println(" Sorry not enough balanc e . . . ");
        }
    }
}
